__author__ = 'Vladimir Iglovikov'


import numpy


"""
decimal - number that we want to convert
nSites - number of sites
returns array representing this integer with base 10 to the number with base 4 with zero added to make it'Stats
length equal to nSites
"""

def int10to4array(decimal, nSites):
    result = numpy.base_repr(decimal, 4)
    result = '0' * (nSites - len(result)) + result
    return [int(tx) for tx in result]
